<template>
	<!-- 帮助中心 -->
	<view>
		<view class="flex-bc moreItem" v-for="(item,index) in typeList" :key="index" @click="fnToArticleList(item.type_id,item.type_name)">
			<text>{{item.type_name}}</text>
			<uni-icons type="arrowright" size="14" color="#e3e3e3"></uni-icons>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				page:1,
				row:10,
				typeList:[]
			};
		},
		onShow() {
			this.fnGetArticleType()
		},
		methods:{
			fnGetArticleType(){
				this.request({
					url: '/czb/help_center/getTypeList',
					method: 'POST',
					data: {
						'store_id': 1,
						'page':this.page,
						'row':this.row
					},
				}).then((ret) => {
					console.log(ret);
					if (ret.code == 0) {
						this.typeList = ret.data
					}
				})
			},
			fnToArticleList(id,name){
				uni.navigateTo({
					url:`../articleList/articleList?id=${id}&name=${name}`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background: #fff;
	}
	.moreItem {
		height: 100rpx;
		padding: 0 20rpx;
		font-size: 30rpx;
		border-bottom: 1rpx solid #e3e3e3;
	}
</style>
